From 05cae6a7f68dfd0c4dbf3c8d3c35d9172cefb9af Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Mon, 17 Mar 2003 18:57:15 +0000 Subject: [PATCH] bitkeeper revision 1.146 (3e761a8bG8D0sHIrqHKpkx1hSuhB1A) tg3.c: Fix for new tg3 driver. --- xen/drivers/net/tg3.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/drivers/net/tg3.c b/xen/drivers/net/tg3.c index 144d89ceb9..cb1d1e512b 100644 --- a/xen/drivers/net/tg3.c +++ b/xen/drivers/net/tg3.c @@ -2075,10 +2075,11 @@ static int tg3_poll(struct net_device *netdev, int *budget) { struct tg3 *tp = netdev->priv; struct tg3_hw_status *sblk = tp->hw_status; - unsigned long flags; int done; - +#ifdef NAPI + unsigned long flags; spin_lock_irqsave(&tp->lock, flags); +#endif /* handle link change and other phy events */ if (!(tp->tg3_flags & @@ -2098,7 +2099,9 @@ static int tg3_poll(struct net_device *netdev, int *budget) spin_unlock(&tp->tx_lock); } +#ifdef NAPI spin_unlock_irqrestore(&tp->lock, flags); +#endif /* run RX thread, within the bounds set by NAPI. * All RX "locking" is done by ensuring outside -- 2.30.2